//
//  QGTabBarController.m
//  qeegooChat
//
//  Created by heew on 16/1/7.
//  Copyright © 2016年 com.autozi. All rights reserved.
//

#import "QGTabBarController.h"
#import "QGRecentChatController.h"
#import "QGSquareViewController.h"
#import "QGSettingViewController.h"

@implementation QGTabBarController
- (void)hiddenTabBar
{
//    [UIView animateWithDuration:0.26 animations:^{
//        self.tabBar.alpha = 0.f;
//    }];
}
+ (void)initialize {
    UINavigationBar *navBar = [UINavigationBar appearanceWhenContainedIn:[self class], nil];
    UIImage *image = [UIImage imageWithColor:QGMainThemeColor];
    [navBar setBackgroundImage:image forBarMetrics:UIBarMetricsDefault];
    [navBar setTitleTextAttributes:@{NSForegroundColorAttributeName: [UIColor whiteColor],NSFontAttributeName : [UIFont systemFontOfSize:19]}];
}
- (void)showTabBar
{
    [UIView animateWithDuration:0.26 animations:^{
        self.tabBar.alpha = 1.f;
    }];
}
- (void)viewDidLoad {
    [super viewDidLoad];
    QGRecentChatController *qgRecentVc = [[QGRecentChatController alloc] init];
    UINavigationController *nav1 = [[UINavigationController alloc] initWithRootViewController:qgRecentVc];
    [self addChildViewController:nav1];
    qgRecentVc.title = @"会话";
    
    QGSquareViewController *squareVc = [[QGSquareViewController alloc] init];
    UINavigationController *nav2 = [[UINavigationController alloc] initWithRootViewController:squareVc];
    [self addChildViewController:nav2];
    squareVc.title = @"广场";
    
    QGSettingViewController *settingVc = [[QGSettingViewController alloc] init];
    UINavigationController *nav3 = [[UINavigationController alloc] initWithRootViewController:settingVc];
    [self addChildViewController:nav3];
    settingVc.title = @"我的";
}
@end
